﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace commonlib
{   
    [Serializable]
    public class Tuple
    {
        public Tuple(string key,DataServer node,String value,long timeStamp,TRANSACTION_STATES state)
        {
            this.key = key;
            this.node = node;
            this.value = value;
            this.timeStamp = timeStamp;
            this.state = state;
        }

        public string key
        {
            get;
            set;
        }

        public DataServer node
        {
            get;
            set;
        }

        public string value
        {
            get;
            set;
        }

        public long timeStamp
        {
            get;
            set;
        }

        public TRANSACTION_STATES state
        {
            get;
            set;
        }
        
        public override string ToString()
        {
            StringBuilder builder = new StringBuilder();
            builder.Append("(Key:"+this.key+";Node:("+this.node.id+"); Value:"+this.value+"; Timestamp:"+this.timeStamp+"; State:"+this.state+")");
            return builder.ToString();
        }
    }
}
